/*******************************************************************************
 * Copyright 2011 Towee.net
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package net.towee.server;

import java.util.List;

import net.towee.server.util.settings.Setting;

/**
 * Core Towee settings
 */
@SuppressWarnings("unused")
// We inject them by the name of their flag
public class CoreSettings {
	public static final String TOWEE_SERVER_DOMAIN = "towee_server_domain";
	public static final String DEBUG = "debug";
	public static final String TOWEE_SERVER_PORT = "towee_server_port";
	public static final String ACCOUNT_STORAGE_TYPE = "account_storage_type";
	public static final String ATTACHMENT_STORAGE_TYPE = "attach_storage_type";
	public static final String HTTP_FRONTEND_ADDRESSES = "http_frontend_addresses";
	public static final String FTP_PORT = "ftp_port";
	public static final String SMTP_PORT = "smtp_port";
	public static final String SMTP_HOST = "smtp_host";

	public static final String VIDEO_EXTS = "video_exts";
	public static final String AUDIO_EXTS = "audio_exts";
	public static final String PIC_EXTS = "picture_exts";
	public static final String DOC_EXTS = "doc_exts";
	public static final String ARCHIVE_EXTS = "archive_exts";
	
	public static final String ANNOUNCE_URL = "announce_url";
	public static final String ANNOUNCE_INTERVAL = "announce_interval";
	public static final String SMTP_USER = "smtp_user";
	public static final String SMTP_PASS = "smtp_pass";

	@Setting(name = SMTP_PORT, defaultValue = "2500")
	private static int smtpPort;

	@Setting(name = SMTP_HOST, defaultValue = "localhost")
	private static String smtpHost;
	
	@Setting(name = SMTP_USER, defaultValue = "")
	private static String smtpUser;
	
	@Setting(name = SMTP_PASS, defaultValue = "")
	private static String smtpPass;

	@Setting(name = TOWEE_SERVER_DOMAIN, defaultValue = "localhost")
	private static String toweeServerDomain;

	@Setting(name = TOWEE_SERVER_PORT, defaultValue = "8081", description = "The server's port")
	private static String toweeServerPort;

	@Setting(name = ACCOUNT_STORAGE_TYPE, defaultValue = "mongodb", description = "The type of account storring. Available mongod and memory")
	private static String accountStorageType;

	@Setting(name = ATTACHMENT_STORAGE_TYPE, defaultValue = "mongodb", description = "The type of files storring. Available mongod and disk")
	private static String attachStorageType;
	
	@Setting(name = ANNOUNCE_URL, defaultValue = "http://localhost/announce")
	private static String announceUrl;
	
	@Setting(name = ANNOUNCE_INTERVAL, defaultValue = "60")
	private static int announceInterval;

	@Setting(name = HTTP_FRONTEND_ADDRESSES, defaultValue = "localhost:8080")
	private static List<String> frontendAddress;

	@Setting(name = FTP_PORT, defaultValue = "2221", description = "Port of towee FTP")
	private static int ftpPort;

	@Setting(name = DEBUG, defaultValue = "false", description = "Debug mode")
	private static boolean debug;

	@Setting(name = VIDEO_EXTS, defaultValue = "avi,mpg,mkv,mp4")
	private static List<String> videoExts;

	@Setting(name = AUDIO_EXTS, defaultValue = "mp3,flac,wav,ogg")
	private static List<String> audioExts;

	@Setting(name = PIC_EXTS, defaultValue = "jpg,jpeg,jpe,png,tiff,cr2")
	private static List<String> picExts;

	@Setting(name = DOC_EXTS, defaultValue = "doc,odt,xls,docx,xlsx")
	private static List<String> docExts;

	@Setting(name = ARCHIVE_EXTS, defaultValue = "zip,rar,7zip")
	private static List<String> archiveExts;
}
